#include <stdio.h>
#include <string.h>

union Test
{
	int i;
	double pi;
	//char str1[6];
	char str1[10];
};

int main(void)
{
	union Test test;
	
	test.i = 520;
	test.pi = 3.14;
	strcpy(test.str1, "sy12345678");
	
	printf("addr of test.i:%p\n", &test.i);
	printf("addr of test.pi:%p\n", &test.pi);
	printf("addr of test.str1:%p\n", &test.str1);

	printf("addr of test.i:%d\n", &test.i);
	printf("addr of test.pi:%.2f\n", &test.pi);
	printf("addr of test.str1:%s\n", &test.str1);

	printf("size of test: %d\n",sizeof(test));

	return 0;
}
